﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
namespace dungeon_brawler.classes
{
    class Enemy1 : Enemy// We'll decide the name for this later
    {
       

        public Enemy1(int lvl, Vector2 position, Texture2D texture, Player target)
            : base(lvl, position, texture, target)
        {
            // Add the class specific modifers
            atk += 15;
            def += 25;
            hp += 10;
            // Set the cooldown per attack
            cooldown = .75;
            // Set offsets
            atkOffset = 16;
            collisionOffset = 0;
            // Lvl up according to level
            lvlUp(lvl);
            spd = 1;
            collisionOffset = 0;
        }

        public override void Update(GameTime gameTime, Rectangle clientBounds)
        {
            //normalize allows the enemy to TRANSITION to the new position, rather then SNAP to position
            direction = Vector2.Normalize(target.Position - this.position);
            this.position += direction * spd;
            base.Update(gameTime, clientBounds);

        }

        /// <summary>
        /// Returns class stats
        /// </summary>
        /// <returns>String</returns>
        public override String ToString()
        {
            return GetType() +
                base.ToString();
        }
    }
}
